package com.fxnotes.book.node;

import com.fxnotes.domain.model.NamedEntity;

public class EditEntityComponentBuilder<T extends NamedEntity> {

    private String header;
    private String entityName = "";
    private Integer width = 200;
    private Integer height = 300;
    private boolean moveButtonsVisible;
    private EditEntityHandler<T> editEntityHandler;

    public static <T extends NamedEntity> EditEntityComponentBuilder<T> create() {
        return new EditEntityComponentBuilder<>();
    }

    public EditEntityComponent<T> build() {
        return new EditEntityComponent<>(this);
    }

    public String getEntityName() {
        return entityName;
    }

    public EditEntityComponentBuilder<T> setEntityName(String entityName) {
        this.entityName = entityName;
        return this;
    }

    public String getHeader() {
        return header;
    }

    public EditEntityComponentBuilder<T> setHeader(String header) {
        this.header = header;
        return this;
    }

    public Integer getHeight() {
        return height;
    }

    public EditEntityComponentBuilder<T> setHeight(Integer height) {
        this.height = height;
        return this;
    }

    public boolean areMoveButtonsVisible() {
        return moveButtonsVisible;
    }

    public EditEntityComponentBuilder<T> setMoveButtonsVisible(boolean moveButtonsVisible) {
        this.moveButtonsVisible = moveButtonsVisible;
        return this;
    }

    public Integer getWidth() {
        return width;
    }

    public EditEntityComponentBuilder<T> setWidth(Integer width) {
        this.width = width;
        return this;
    }

    public EditEntityHandler<T> getEditEntityHandler() {
        return editEntityHandler;
    }

    public EditEntityComponentBuilder<T> setHandler(EditEntityHandler<T> editEntityHandler) {
        this.editEntityHandler = editEntityHandler;
        return this;
    }
}
